﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BusinessObjects.BusinessRules;

namespace BusinessObjects.Sales
{
    public class ReceiptDetail : BusinessObject
    {
        public ReceiptDetail()
        {
            AddRule(new ValidateRequired("RefDetailID"));

            AddRule(new ValidateRequired("RefID"));

            AddRule(new ValidateRequired("AccountingObjectID"));
        }

        public ReceiptDetail(string refDetailId, string refId, string description, decimal amount, string accountingObjectId, string accountObjectName,
                                string acountingObjecAddress)
            : this()
        {
            RefDetailID = refDetailId;
            RefID = refId;
            Description = description;
            Amount = amount;
            AccountingObjectID = accountingObjectId;
            AccountingObjectName = accountObjectName;
            AccountingObjecAddress = acountingObjecAddress;
        }

        public string RefDetailID { get; set; }

        public string RefID { get; set; }

        public string Description { get; set; }

        public decimal Amount { get; set; }

        public string AccountingObjectID { get; set; }

        public string AccountingObjectName { get; set; }

        public string AccountingObjecAddress { get; set; }
    }
}
